package com.peng.wx_official_account.hooks;

import com.peng.wx_official_account.service.impl.WeChatPushImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RequiredArgsConstructor
@SuppressWarnings("unused")
public class SpringHooksListener implements ApplicationListener<ApplicationStartedEvent> {

    private final WeChatPushImpl service;

    @Override
    public void onApplicationEvent(ApplicationStartedEvent event) {
        log.info("ApplicationStartedEvent");

        //微信Token刷新,因为启动时定时任务会进行刷新这里暂时不需要了
        //service.refreshToken();
    }
}
